<template>
<div class="activity-wrapper">
  <img v-for="(item) in imgs" :src="item" :key="item">
</div>
</template>

<script>
export default {
  name: 'Activity',
  data: function () {
    return { imgs: [] }
  },
  created: function () {
    this.initData()
  },
  methods: {
    initData: function () {
      this.$http.get('/main/activity')
        .then(data => {
          console.log(data)
          this.imgs = data
        })
        .catch(err => {
          console.log(err)
        })
    }
  }
}
</script>

<style lang="stylus" scoped>
.activity-wrapper
  width :100%
  height: px2rem(200)
  display:flex
  flex-direction :row
  img
    object-fit :fit
    width:33.333%
    flex: 1 1 33.333%
    align-items :stretch
</style>
